class @ShowProfileModel extends Backbone.Model
    defaults:
        UserId: 0
        Login: ''
        Email: ''
        Status: ''
        Avatar: ''
        SuccessMessage: ''
        CurrentUserId: 0

    url: ->        
        url = SiteMap.Profile.Show + "/" + @attributes.Login
        url += "?login=" + @attributes.Login
        return url

    parse: (response) ->
        attrs = 
            UserId: response.UserId
            Login : response.Login
            Email: response.Email
            Status: response.Status
            CurrentUserId: response.CurrentUserId
        if response.Avatar?
            attrs.Avatar = "/myLibrary/Uploads/" + response.Avatar
        return attrs

